<!-- 安全检查 -->
<template>
	<view class="body">

		<view class="hw_msg">
			<view class="item_top">
				<view class="view_pai">
					<text class="text_pai">运输信息</text>
				</view>
			</view>
			<view class="info-item">
				<text class="text">车辆信息:</text>
				<text class="value">{{ysMap.vehCode}}</text>
			</view>
			<view class="info-item">
				<text class="text">挂车信息:</text>
				<text class="value">{{ysMap.trailerVehCode}}</text>
			</view>
			<view class="info-item">
				<text class="text">驾驶员:</text>
				<text class="value">{{ysMap.driverName}}</text>
			</view>
			<view class="info-item">
				<text class="text">押运员:</text>
				<text class="value">{{ysMap.escortName}}</text>
			</view>
			<view class="info-item">
				<text class="text">运输货物:</text>
				<text class="value">{{ysMsgMap.hw_name.toString()}}</text>
			</view>
			<view class="info-item">
				<text class="text">装货日期:</text>
				<text class="value">{{ysMsgMap.estimateLoadingTime}}</text>
			</view>
			<view class="info-item">
				<text class="text">卸货日期:</text>
				<text class="value">{{ysMsgMap.estimateUnloadingTime}}</text>
			</view>
			<view class="info-item">
				<text class="text">装货地点:</text>
				<text class="value">{{ysMsgMap.zh_address.toString()}}</text>
			</view>
			<view class="info-item">
				<text class="text">收货地点:</text>
				<text class="value">{{ysMsgMap.sh_address.toString()}}</text>
			</view>
			<view class="info-item">
				<text class="text">运输线路:</text>
				<text class="value">{{ysMsgMap.lineName}}</text>
			</view>
			<view class="info-item">
				<text class="text">货物重量:</text>
				<text class="value">{{ysMsgMap.goodsWeight}}吨</text>
			</view>
			<view class="info-item" style="border: none;">
				<text class="text">线路里程:</text>
				<text class="value">{{ysMsgMap.lineMileage}}千米</text>
			</view>
		</view>

		<view class="hw_msg" style="margin-top: 20rpx;">
			<view class="item_top">
				<view class="view_pai">
					<text class="text_pai">系统自检</text>
				</view>
			</view>

			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.ownerCert)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.ownerCert)]">{{zjMap.ownerCert=="1"?"经营许可证在有效期内":"经营许可证未在有效期内"}}</text>
				</view>
				<view class="text_item" :style="[getStyle(zjMap.vehCert)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.vehCert)]">{{zjMap.vehCert=="1"?"道路运输证在有效期内":"道路运输证未在有效期内"}}</text>
				</view>
			</view>
			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.vehGoods)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.vehGoods)]">{{zjMap.vehGoods=="1"?"车辆经营范围与拟运货物匹配":"车辆经营范围与拟运货物不匹配"}}</text>
				</view>
				<view class="text_item" :style="[getStyle(zjMap.annualReview)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.annualReview)]">{{zjMap.annualReview=="1"?"车辆年审在有效期内":"车辆年审未在有效期内"}}</text>
				</view>
			</view>

			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.insuredValid)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.insuredValid)]">{{zjMap.insuredValid=="1"? "车辆承运人责任险正常":"车辆承运人责任险异常"}}</text>
				</view>
			</view>
			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.driverLic)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.driverLic)]">{{zjMap.driverLic=="1"?"驾驶员从业资格证在有效期内":"驾驶员从业资格证未在有效期内"}}</text>
				</view>
				<view class="text_item" :style="[getStyle(zjMap.driverQualifica)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.driverQualifica)]">{{zjMap.driverQualifica=="1"?"驾驶员从业资格证匹配":"驾驶员从业资格证不匹配"}}</text>
				</view>
			</view>
			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.escortLic)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.escortLic)]">{{zjMap.escortLic=="1"?"押运员从业资格证在有效期内":"押运员从业资格证未有效期内"}}</text>
				</view>
				<view class="text_item" :style="[getStyle(zjMap.escorQualifica)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.escorQualifica)]">{{zjMap.escorQualifica=="1"?"押运员从业资格证匹配":"押运员从业资格证不匹配"}}</text>
				</view>
			</view>
			<view class="zj-item">
				<view class="text_item" :style="[getStyle(zjMap.gpsterminal)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.gpsterminal)]">{{zjMap.gpsterminal=="1"?"车辆卫星定位装置正常":"车辆卫星定位装置异常"}}</text>
				</view>
				<view class="text_item" :style="[getStyle(zjMap.overload)]">
					<text class="textContent"
						:style="[getTextStyle(zjMap.overload)]">{{zjMap.overload=="1"? "货物未超载":"货物超载"}}</text>
				</view>
			</view>
		</view>
		<!-- 出车前检查 -->
		<view class="hw_msg" style="margin-top: 20rpx;">
			<view class="item_top" v-if="out_list.length==0">
				<view class="view_pai">
					<text class="text_pai">出车前检查 (驾押人员未做出车前行车日志)</text>
				</view>
			</view>
			<view class="item_top" v-if="out_list.length>0">
				<view class="view_pai">
					<text class="text_pai">出车前检查</text>
				</view>
			</view>
			<view v-for="(item,index) in out_list">
				<view class="item_text">
					<text>{{item.checkPro}}:</text>
					<text class="value"
						style="margin-left: 20rpx;">{{checkResultObj[item.checkResult]||item.checkResult}}</text>
				</view>
			</view>
			<view v-for="(item,index) in img_list" style="padding-left: 20rpx;display: inline;">
				<image class="img_car" :src='item'></image>
			</view>

		</view>
		<!-- 人工自检 -->
		<view class="hw_msg" style="margin-top: 20rpx;padding-bottom: 20rpx;">
			<view class="item_top">
				<view class="view_pai">
					<text class="text_pai">人工自检</text>
				</view>
			</view>
			<view class="zj_view">
				<view v-for="(item,index) in person_list" :key="index">
					<view class="item_hang" v-if="index==0">
						<view class="title_left"><text class="title_text">检查项目</text></view>
						<!-- <view class="shu_line"></view> -->
						<view class="title_center"><text class="title_text">检查内容</text></view>
						<!-- <view class="shu_line"></view> -->
						<view class="title_right"><text class="title_text">操作</text></view>
					</view>
					<view class="item_hang" :style="[getborder(index)]" v-if="index!=0">
						<view class="title_left"><text>{{item.checkPro}}</text></view>
						<!-- <view class="shu_line"></view>
						 -->
						<view class="title_center"><text>{{item.checkContent}}</text></view>
						<!-- <view class="shu_line"></view> -->
						<view class="title_right">
							<checkbox @click="checkClick(index-1)"></checkbox>
						</view>
					</view>
				</view>

			</view>
		</view>
		<!-- 注意事项 -->
		<view class="hw_msg" style="margin-top: 20rpx;padding: 10rpx;">
			<view class="item_top">
				<view class="view_pai">
					<text class="text_pai">注意事项</text>
				</view>
			</view>
			<view class="zysx-box">
				<uni-data-select v-model="selectRemarkTitle" :localdata="busitaskremarkList" @change="selectRemark"
					placeholder="请选择注意事项"></uni-data-select>
				<view class="uni-icon" @click="alertShow=true">&#xe468;</view>
			</view>
			<textarea class="info-textarea" v-model="putContext" disabled  maxlength="1024"/>
		</view>
		<view class="add-btns" v-if="taskDetail.taskState == '3'">
			<view class="btn-cancel" @click="clickNo()">
				<text>检查不通过</text>
			</view>
			<view class="btn-submit" @click="clickOk()">
				<text>检查通过</text>
			</view>
		</view>

		<view class="alert-box" v-if="alertShow">
			<view class="alert-head">
				<view class="alert-title">注意事项管理</view>
				<view class="uni-icon" @click="zysxClose">&#xe460;</view>
			</view>
			<view class="alert-table">
				<view class="table-head">
					<view class="item-title">
						注意事项标题
					</view>
					<view class="item-content">
						注意事项内容
					</view>
					<view class="item-handle">
						操作
					</view>
				</view>
				<view class="table-list">
					<view class="list-item" v-for="(item,index) in busitaskremarkList" :key="index">
						<view class="item-title">
							<input placeholder="请输入标题" :disabled="!!item.remarkId" v-model="item.text" maxlength="255" />
						</view>
						<view class="item-content">
							<textarea placeholder="请输入内容" :disabled="!!item.remarkId" v-model="item.value" maxlength="1024"></textarea>
						</view>
						<view class="item-handle">
							<view class="item-del" v-if="item.remarkId" @click="zhuyishixiangDel(item)">
								删除
							</view>
							<view class="item-del" v-if="!item.remarkId" @click="zhuyishixiangAdd(item)">
								保存
							</view>
							<view class="item-del" v-if="!item.remarkId" @click="busitaskremarkList.splice(index,1)">
								取消
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="add-row" @click="zhuyishixiangAdd()">
				新增注意事项
			</view>
		</view>

		<modal-confirm :data="confirmData" :visible.sync="showDialog" @confirm="okJc">
		</modal-confirm>

		<modal-confirm :data="showLogMsg" :visible.sync="isShowLog" @confirm="logOk">
		</modal-confirm>

		<modal-confirm :data="logMsg" :visible.sync="isShowDialog" @confirm="cliOk">
		</modal-confirm>

		<modal-confirm :data="countMsg" :visible.sync="isShowCountDialog" @confirm="countOk">
		</modal-confirm>

		<modal-check-no :visible.sync="checkNoConfirm" @confirm="checkNoChange"></modal-check-no>

	</view>
</template>

<script>
	import modalCheckNo from '@/components/tool-modal/modal-checkno.vue';
	import modalConfirm from '@/components/tool_task/show-log.vue';
	export default {
		data() {
			return {
				alertShow: false,
				// 注意事项列表
				busitaskremarkList: [],
				selectRemarkTitle: "",
				checkResultObj: ['正常', '异常', '已检修'],
				checkNoConfirm: false,
				showDialog: false,
				isShowLog: false,
				isShowDialog: false,
				isShowCountDialog: false,
				countMsg: {
					title: '提示信息',
					content: ''
				},
				confirmData: {
					title: '提示信息',
					content: "系统自检存在警告,是否继续通过?"
				},
				showLogMsg: {
					title: '提示信息',
					content: "驾押人员未做出车前行车日志,是否继续通过?"
				},
				logMsg: {
					title: '提示信息',
					content: "出车前行车日志检查项有异常，是否继续通过?"
				},
				//车辆与驾押信息
				ysMap: {
					vehId: '',
					vehCode: '',
					trailerVehCode: '',
					driverName: '',
					escortName: '',
				},
				//系统自检
				zjMap: {
					ownerCert: "", //是否强制检查-企业经营许可证
					vehCert: "", //车辆道路运输证
					vehGoods: "", //车货经营范围匹配
					annualReview: "", //车辆年审在有效期内
					insuredValid: "", //车辆承运人责任险
					// vehTecRank: "", //车辆技术等级评定在有效期内
					overload: "", //货物超载检查
					driverLic: "", //驾驶员证件在有效期内
					escortLic: "", //押运员证件在有效期内
					driverQualifica: "", //驾驶员从业资格证匹配
					escorQualifica: "", //押运员从业资格证匹配
					gpsterminal: "" //车辆卫星定位装置是否正常 
				},
				out_list: [], //出车前检查集合
				img_list: [], //出车前检查图片集合
				person_list: [''], //人工自检集合
				options: {},
				peoCheckdicts: [],
				busiTaskgoodsList: [],
				taskDetail: {
					taskState: '0',
				},
				putContext: '', //用来记录输入的内容
				checkList: [], //用来记录人工自检
				ysMsgMap: {
					hw_name: [], //货物名称s
					zh_address: [], //详细地址
					sh_address: [], //详细地址
					estimateLoadingTime: '', //装货日期
					estimateUnloadingTime: '', //卸货日期
					lineName: '', //线路名称
					goodsWeight: 0, //重量
					lineMileage: '', //线路里程

				},
				isZj: false, //是否自检
				isChucheCheck: false, //是否出车前检查
				isChucheCheckYc: false, //出车前检查有异常项
				ydCount: 0,
				ydMaxCount: 0,
				commitState: false, // 提交状态
			};
		},
		components: {
			modalCheckNo,
			modalConfirm
		},
		onLoad(option) {
			this.options = option
		},
		mounted() {
			this.initData()
		},
		methods: {
			selectRemark(e) {
				this.putContext = e
			},
			zysxClose() {
				this.busitaskremarkList = this.busitaskremarkList.filter(item => {
					return !!item.remarkId;
				})
				this.alertShow = false
			},
			zhuyishixiangDel(item) {
				const data = {
					isDeleted: "1",
					remarkId: item.remarkId,
				}
				this.$api.busitaskremarkSubmit(data).then(() => {
					this.zhuyishixiagn();
					this.$nextTick(() => {
						if (this.putContext == item.value) {
							this.putContext = "";
							this.selectRemarkTitle = "";
						}
					})
				})
			},
			zhuyishixiangAdd(data) {
				if (!data) {
					this.busitaskremarkList.push({
						remarkId: '',
						text: '',
						value: '',
					})
					return;
				}
				if (!data.text) {
					uni.showToast({
						title: "请输入注意事项标题",
						icon: "none"
					})
					return;
				}
				if (data.text.length > 255) {
					uni.showToast({
						title: '注意事项标题长度不能超过255！',
						icon: 'none'
					})
					return false;
				}
				if (!data.value) {
					uni.showToast({
						title: "请输入注意事项内容",
						icon: "none"
					})
					return;
				}
				if (data.value.length > 1024) {
					uni.showToast({
						title: '注意事项内容长度不能超过1024！',
						icon: 'none'
					})
					return false;
				}
				data = {
					remarkContent: data.value,
					remarkTitle: data.text,
					remarkType: "3",
				}
				this.$api.busitaskremarkSubmit(data).then(() => {
					this.zhuyishixiagn();
					this.putContext = data.remarkContent;
					this.selectRemarkTitle = data.text;
				})
			},
			zhuyishixiagn() {
				this.$api.busitaskremarkList().then(res => {
					this.busitaskremarkList = res.data.data.map(item => {
						return {
							remarkId: item.remarkId,
							text: item.remarkTitle,
							value: item.remarkContent,
						}
					})
				})
			},
			checkNoChange(data) {
				if (this.commitState) {
					return;
				}
				this.commitState = true;
				this.$api.checkYorN({
					'dispCheckId': this.options.dispCheckId,
					'checkNote': this.putContext,
					'checkState': '0',
					'taskId': this.options.taskId,
					'checkDesc': data,
					'peoCheckdicts': this.peoCheckdicts,
				}).then(res => {
					if (res.data.code == 200) {
						uni.showToast({
							title: '完成',
							mask: true,
							success() {
								setTimeout(() => {
									let pages = getCurrentPages(); // 当前页面        
									let beforePage = pages[pages.length - 2]; // 上上一页 
									uni.navigateBack({
										success: () => {
											beforePage.$vm.getList();
										}
									});
								}, 1500); // showToast默认时间
							}
						});
					} else {
						uni.showToast({
							title: '服务器异常',
							icon: 'none'
						})
					}
				}).catch(res => {})
			},
			countOk() {
				if (this.ydCount + 1 > this.ydMaxCount) {
					uni.showToast({
						title: '超过车辆最大执行运单量,禁止派发',
						icon: 'none'
					})
				} else {
					this.commit()
				}
			},
			cliOk() {
				this.isChucheCheckYc = true
				this.selfCheck()
			},
			logOk() {
				this.isChucheCheck = true
				this.selfCheck()
			},
			okJc() {
				this.isZj = true
				this.chuCheCheak()
			},
			//检查不通过
			clickNo() {
				this.checkNoConfirm = true
			},
			//检查通过
			clickOk() {
				if (this.zjMap.ownerCert != "2" &&
					this.zjMap.vehCert != "2" &&
					this.zjMap.vehGoods != "2" &&
					this.zjMap.annualReview != "2" &&
					this.zjMap.insuredValid != "2" &&
					// this.zjMap.vehTecRank != "2" &&
					this.zjMap.overload != "2" &&
					this.zjMap.driverLic != "2" &&
					this.zjMap.escortLic != "2" &&
					this.zjMap.driverQualifica != "2" &&
					this.zjMap.escorQualifica != "2" &&
					this.zjMap.gpsterminal != "2") {

					if (this.zjMap.ownerCert == "3" ||
						this.zjMap.vehCert == "3" ||
						this.zjMap.vehGoods == "3" ||
						this.zjMap.annualReview == "3" ||
						this.zjMap.insuredValid == "3" ||
						// this.zjMap.vehTecRank == "3" ||
						this.zjMap.overload == "3" ||
						this.zjMap.driverLic == "3" ||
						this.zjMap.escortLic == "3" ||
						this.zjMap.driverQualifica == "3" ||
						this.zjMap.escorQualifica == "3" ||
						this.zjMap.gpsterminal == "3") { //只要为true 说明就有黄色   提示弹窗
						if (this.isZj) {
							this.chuCheCheak()
						} else {
							this.showDialog = true
						}
					} else {
						this.chuCheCheak()
					}
				} else {
					uni.showToast({
						title: '系统自检存在异常',
						icon: 'none'
					})
				}
			},
			//出车前检查
			chuCheCheak() {
				if (this.out_list.length == 0) { //说明未做出车前检查
					if (this.isChucheCheck) { //做人工自检
						this.selfCheck()
					} else {
						this.isChucheCheck = true
					}
				} else {
					if (this.isChucheCheckYc) {
						this.selfCheck()
					} else {
						for (var i = 0; i < this.out_list.length; i++) {
							if (this.out_list[i].checkResult == 1) {
								this.isShowDialog = true
								break
							} else if (i == this.out_list.length - 1) {
								if (this.out_list[i].checkResult != 1) {
									this.selfCheck()
								}
								break
							}
						}
					}
				}
			},
			//人工自检
			selfCheck() {
				for (var i = 0; i < this.checkList.length; i++) {
					if (this.checkList[i] == false) {
						uni.showToast({
							title: '人工检查中有检查项目还未检查，请检查！',
							icon: 'none'
						})
						break
					} else if (i == this.checkList.length - 1) { //说明执行到最后了
						if (this.checkList[i] == true) { //说明人工检查全为true
							//执行请求有多少条运单
							this.$api.checkTaskNum({
								'vehId': this.ysMap.vehId,
							}).then(res => {
								if (res.data.code == 200) {
									var count = res.data.data.count
									var maxCount = res.data.data.max
									this.ydCount = count
									this.ydMaxCount = maxCount
									if (count == 0) {
										this.commit()
									} else {
										this.countMsg.content = "当前车辆有" + count + "单运单待执行，是否继续派发?"
										this.isShowCountDialog = true
									}
								} else {
									uni.showToast({
										title: '服务器异常',
										icon: 'none'
									})
								}
							}).catch(res => {})
						}
					}
				}
			},
			commit() {
				if (this.commitState) {
					return;
				}
				this.commitState = true;
				this.$api.checkYorN({
					'dispCheckId': this.options.dispCheckId,
					'checkNote': this.putContext,
					'checkState': '1',
					'taskId': this.options.taskId,
					'checkDesc': '',
					'peoCheckdicts': this.peoCheckdicts,
				}).then(res => {
					if (res.data.code == 200) {
						uni.showToast({
							title: '完成',
							mask: true,
							success() {
								setTimeout(() => {
									let pages = getCurrentPages(); // 当前页面        
									let beforePage = pages[pages.length - 2]; // 上上一页 
									uni.navigateBack({
										success: () => {
											beforePage.$vm.getList();
										}
									});
								}, 1500); // showToast默认时间
							}
						});
					} else {
						uni.showToast({
							title: '服务器异常',
							icon: 'none'
						})
					}
				}).catch(res => {})
			},
			checkClick(index) {
				this.checkList[index] = this.checkList[index] ? false : true
			},
			initData() {
				if (this.options.dispCheckId != '') {
					this.$api.aqCcjc({
						'taskId': this.options.taskId,
						'logType': 10,
					}).then(res => {
						if (res.data.code == 200) {
							this.out_list = res.data.data.list
							var qtJc = res.data.data.logContent
							if (qtJc != '') {
								this.out_list.push({
									checkPro: '其他检查',
									checkResult: qtJc
								})
							}
							var picUrl = res.data.data.picUrl
							if (picUrl != '') {
								this.img_list = picUrl.split(',')
							}
						} else {
							uni.showToast({
								title: '服务器异常',
								icon: 'none'
							})
						}
					}).catch(res => {})
					this.$api.carPersonDetail({
						'dispCheckId': this.options.dispCheckId
					}).then(res => {
						if (res.data.code == 200) {
							this.ysMap.vehId = res.data.data.vehId
							this.ysMap.vehCode = res.data.data.vehCode
							this.ysMap.trailerVehCode = res.data.data.trailerVehCode
							this.ysMap.driverName = res.data.data.driverName
							this.ysMap.escortName = res.data.data.escortName
						} else {
							uni.showToast({
								title: '服务期异常',
								icon: 'none'
							})
						}
					}).catch(res => {})
				} else {
					uni.showToast({
						title: 'dispCheckId为空',
						icon: 'none'
					})
				}
				if (this.options.taskId != '') {
					this.$api.ddDetail({
						'id': this.options.id,
						'taskId': this.options.taskId,
						'dispCheckId': this.options.dispCheckId
					}).then(res => {
						if (res.data.code == 200) {
							Object.assign(this.taskDetail, res.data.data)
							var busiTaskgoodsList = res.data.data.busiTaskgoodsList
							this.busiTaskgoodsList = res.data.data.busiTaskgoodsList
							busiTaskgoodsList.forEach((item, index) => {
								this.ysMsgMap.hw_name.push(item.ownerGoodsAlias)
							})
							var busiTaskaddrList = res.data.data.busiTaskaddrList
							busiTaskaddrList.forEach((item, index) => {
								if (item.addrType == 1) {
									this.ysMsgMap.zh_address.push(item.addr)
								} else {
									this.ysMsgMap.sh_address.push(item.addr)
								}
							})
							this.ysMsgMap.estimateLoadingTime = res.data.data.estimateLoadingTime
							this.ysMsgMap.estimateUnloadingTime = res.data.data.estimateUnloadingTime
							this.ysMsgMap.lineName = res.data.data.lineName
							this.ysMsgMap.goodsWeight = res.data.data.goodsWeight
							this.ysMsgMap.lineMileage = res.data.data.lineMileage
						}
					}).catch(res => {})
				}
				this.$api.selfCheck({
					'taskId': this.options.taskId,
					'dispCheckId': this.options.dispCheckId,
				}).then(res => {
					if (res.data.code == 200) {
						var map = res.data.data
						this.zjMap.ownerCert = map["ownerCert"];
						this.zjMap.vehCert = map["vehCert"];
						this.zjMap.vehGoods = map["vehGoods"];
						this.zjMap.annualReview = map["annualReview"];
						this.zjMap.insuredValid = map["insuredValid"];
						// this.zjMap.vehTecRank = map["vehTecRank"];
						this.zjMap.overload = map["overload"];
						this.zjMap.driverLic = map["driverLic"];
						this.zjMap.escortLic = map["escortLic"];
						this.zjMap.driverQualifica = map["driverQualifica"];
						this.zjMap.escorQualifica = map["escorQualifica"];
						this.zjMap.gpsterminal = map["gpsterminal"];
					} else {
						uni.showToast({
							title: '服务器异常',
							icon: 'none'
						})
					}
				}).catch(res => {})
				this.$api.personCheck({
					'checkType': 50
				}).then(res => {
					if (res.data.code == 200) {
						this.person_list = this.person_list.concat(res.data.data)
						res.data.data.forEach((item, index) => {
							this.checkList.push(false)
							var map = {
								"id": res.data.data[index]["id"],
								"dictId": res.data.data[index]["dictId"],
								"checkPro": res.data.data[index]["checkPro"],
								"checkContent": res.data.data[index]["checkContent"],
								"sortNum": res.data.data[index]["sortNum"],
							};
							this.peoCheckdicts.push(map)
						})
					} else {
						uni.showToast({
							title: '服务器异常',
							icon: 'none'
						})
					}
				}).catch(res => {})

				this.zhuyishixiagn();
			},
			getborder(index) {
				if (this.person_list.length - 1 == index) {
					return {
						border: 'none',
					}
				}
			},
			getStyle(num) {
				if (num == "1") {
					return {
						border: '1rpx solid #4CAF50',
					}
				} else if (num == "2") {
					return {
						border: '1rpx solid #F44336',
					}
				} else if (num == "3") {
					return {
						border: '1rpx solid #FFEB3B',
					}
				} else {
					return {
						border: '1rpx solid #FFFFFF',
					}
				}
			},
			getTextStyle(num) {
				if (num == "1") {
					return {
						color: '#4CAF50',
					}
				} else if (num == "2") {
					return {
						color: '#F44336',
					}
				} else if (num == "3") {
					return {
						color: '#FFEB3B',
					}
				} else {
					return {
						color: '#FFFFFF',
					}
				}
			}
		}
	}
</script>

<style lang="scss">
	.body {
		padding: 20rpx;

		.alert-box {
			position: fixed;
			left: 20rpx;
			top: 20rpx;
			right: 20rpx;
			bottom: 20rpx;
			background-color: #fff;
			box-shadow: 0 0 20rpx rgba(0, 0, 0, .3);
			display: flex;
			flex-direction: column;

			.alert-head {
				line-height: 3em;
				border-bottom: 1px solid #ccc;
				display: flex;
				align-items: center;
				padding: 0 20rpx;

				.alert-title {
					flex: 1;
				}
			}

			.alert-table {
				flex: 1;
				margin: 20rpx;
				display: flex;
				flex-direction: column;
				overflow: hidden;

				.table-head {
					background-color: #efefef;
					text-align: center;
				}

				.table-head,
				.list-item {
					display: flex;
					overflow: hidden;

					.item-title {
						width: 200rpx;
						padding: 10rpx 20rpx;
						display: flex;
						align-items: center;

						input {
							width: 100%;
							border: 1px solid #ccc;
							padding: 0 20rpx;
							font-size: 28rpx;
							border-radius: 8rpx;
						}
					}

					.item-content {
						flex: 1;
						padding: 10rpx 20rpx;
						display: flex;
						align-items: center;

						textarea {
							width: 100%;
							border: 1px solid #ccc;
							padding: 10rpx 20rpx;
							font-size: 28rpx;
							border-radius: 8rpx;
						}
					}

					.item-handle {
						width: 3em;
						padding: 10rpx 20rpx;
						display: flex;
						align-items: center;
						flex-direction: column;
						justify-content: center;
					}
				}

				.table-list {
					flex: 1;
					overflow: auto;
					padding-bottom: 20rpx;
				}
			}

			.add-row {
				margin: 0 20rpx 20rpx;
				border: 1px dashed #ccc;
				text-align: center;
				line-height: 2em;
			}
		}

		.add-btns {
			text-align: center;
			padding: 20rpx 0;
			margin-top: 40rpx;


			.btn-cancel,
			.btn-submit {

				display: inline-block;
				margin: 0 20rpx;
				border-radius: 50rpx;
				padding: 0 60rpx;
				font-size: 32rpx;
			}

			.btn-cancel {
				border: 2rpx solid #CCCCCC;
				line-height: 70rpx;
			}

			.btn-submit {
				line-height: 70rpx;
				background-color: $app-color;
			}
		}

		.hw_msg {
			background-color: #FFFFFF;
			border-radius: 20rpx;



			.zj_view {
				border: 1rpx solid #000000;

				.item_hang {
					display: flex;
					width: 100%;
					// height: 80rpx;
					border-bottom: 1rpx solid #000000;

					.title_left {
						width: 150rpx;
						// height: 80rpx;
						// line-height: 80rpx;
						text-align: center;
					}

					.title_center {
						flex: 1;
						// height: 80rpx;
						// line-height: 80rpx;
						text-align: center;
						border-left: 1rpx solid #000;
						border-right: 1rpx solid #000;
					}

					.title_right {
						width: 100rpx;
						// height: 80rpx;
						// line-height: 80rpx;
						text-align: center;
						display: flex;
						align-items: center;
						justify-content: center;
					}

					.shu_line {
						width: 1rpx;
						height: 80rpx;
						background-color: #000000;
					}

					.title_text {
						font-weight: 700;
					}
				}
			}

			.item_top {
				display: flex;
				height: 80rpx;
				flex-direction: column;

				.view_pai {
					border-left: 5rpx solid $app-color;
					padding-left: 20rpx;
					padding-right: 20rpx;
					height: 30rpx;
					// background-color: #07C160;
					margin-top: 30rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.text_pai {
						font-size: 28rpx;
						font-weight: 700;
					}

					.delect {
						width: 30rpx;
						height: 30rpx;
					}
				}

				.line {
					height: 2rpx;
					margin: 30rpx 20rpx 0rpx 20rpx;
					background-color: #F2F2F2;
				}

			}

			.zj-item {
				display: flex;
				height: 60rpx;
				align-items: center;
				justify-content: space-between;

				.text_item {
					border: 1rpx solid #4CAF50;
					display: flex;
					width: 48%;
					justify-content: center;
					align-items: center;
					border-radius: 10rpx;

					.textContent {
						font-size: 22rpx;
						color: #4CAF50;
					}
				}

			}

			.info-item {
				display: flex;
				margin: 0rpx 20rpx;
				padding: 20rpx 0;
				align-items: flex-start;


				.text {
					font-size: 28rpx;
					line-height: 36rpx;
				}

				.input {
					font-size: 28rpx;
					height: 36rpx;
					line-height: 36rpx;
					// flex: 1;
					padding: 0 20rpx;
				}

				.value {
					margin-left: 15rpx;
					flex: 1;
				}


			}

			.item_text {
				height: 60rpx;
				display: flex;
				align-items: center;
				padding-left: 20rpx;

				.value {
					flex: 1;
					overflow: hidden;
					-webkit-line-clamp: 1;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-box-orient: vertical;
				}
			}

			.img_car {
				height: 100rpx;
				width: 100rpx;
			}
		}

		.info-textarea {
			width: 100%;
			height: 200rpx;
		}

		.zysx-box {
			display: flex;
			margin-bottom: 20rpx;

			.uni-icon {
				border-radius: 10rpx;
				margin-left: 20rpx;
				line-height: 66rpx;
				width: 100rpx;
				border: 1px solid #e5e5e5;
				color: #666;
				text-align: center;
			}
		}
	}
</style>